#include "CGameManager.h"

CGameManager::CGameManager():nowFps(0)
{

}

void CGameManager::Update()
{
	actionQueue->Update(nowFps, enemy);

	list<CEnemy* >::iterator tempEnemy = enemy.begin();
	while (tempEnemy != enemy.end())
	{
		(*tempEnemy)->Update();
		tempEnemy++;
	}
	nowFps += 1;
}

void CGameManager::Restart()
{
	nowFps = 0;
	enemyBullet.clear();
	selfBullet.clear();
	enemy.clear();

	actionQueue->reStart();
}

void CGameManager::SetActionQueue(CActionQueue* value)
{
	actionQueue = value;
}

void CGameManager::SetObjectManager(CObjectManager* value)
{
	objectManager = value;
}

void CGameManager::Draw()
{
	list<CEnemy* >::iterator tempEnemy = enemy.begin();
	while (tempEnemy != enemy.end())
	{
		(*tempEnemy)->Draw();
		tempEnemy++;
	}
}
